#{extends 'main.html' /}
#{set title:'Home' /}


#{form @save(post?.id)}
	 #{ifErrors}
        <p class="error">
            Please correct these errors.
        </p>
    #{/ifErrors}
     
    <p>
        #{field 'title'}
        <label>Titre:</label>
        <input type="text" name="${field.name}" value="${post?.title}" class="${field.errorClass}" />
        #{/field}
    </p>
    
    
     <p>
        #{field 'content'}
        <label>Contenu:</label>
        <textarea type="text" name="${field.name}" class="${field.errorClass}">${post?.content}</textarea>
        #{/field}
    </p>
     <p>
        <input type="submit" value="Valider" />
    </p>

#{/form}